#ifndef __REGION_SRV_CORE_HPP__
#define __REGION_SRV_CORE_HPP__

#include "region.hpp"
#include "village.hpp"

#include "village_test/GetRegion.h"
#include "village_test/GetVillage.h"
#include "village_test/SetVillage.h"
#include "village_test/AddVillage.h"
#include "village_test/DelVillage.h"

#include "village_test/region.h"

#include <ros/ros.h>

typedef village_test::region region_msg;
typedef village_test::village village_msg;


class RegionServer
{
private:
    /* data */
    ros::NodeHandle nh_;

    ros::ServiceServer get_region_service_;
    ros::ServiceServer get_village_service_;
    ros::ServiceServer set_village_service_;
    ros::ServiceServer add_village_service_;
    ros::ServiceServer del_village_service_;

    bool getRegionServiceCallback(village_test::GetRegion::Request & req,
                                    village_test::GetRegion::Response & res);

    bool getVillageServiceCallback(village_test::GetVillage::Request & req,
                                    village_test::GetVillage::Response & res);

    bool setVillageServiceCallback(village_test::SetVillage::Request & req,
                                    village_test::SetVillage::Response & res);
    
    bool addVillageServiceCallback(village_test::AddVillage::Request & req,
                                    village_test::AddVillage::Response & res);
    
    bool delVillageServiceCallback(village_test::DelVillage::Request & req,
                                    village_test::DelVillage::Response & res);



    Region region_;


public:
    RegionServer(ros::NodeHandle* nodehandle);
    //~RegionServer();
};


#endif /* __REGION_SRV_CORE_HPP__ */